<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>表格边框相关属性</title>
  <style>
    table{
      border: 2px green solid;
      width: 500px;
      /* 控制表格列宽 */
      table-layout: fixed;
      /* 控制单元格间距 */
      border-spacing: 0px;
      /* 合并相邻的单元格的边框 */
      border-collapse: collapse;
      /* 是否展示空单元格 */
      empty-cells: show;
      /* 设置表格标题的位置 */
      caption-side: top;
    }
    td,th{
      border: 2px orange solid;

    }
  </style>
</head>
<body>
  <table>
    <caption>我的表格</caption>
    <thead>
      <tr>
        <th>姓名</th>
        <th>年龄</th>
        <th>性别</th>

      </tr>
    </thead>
    <tbody>
      <tr>
        <td>张三</td>
        <td>18</td>
        <td>男</td>

      </tr>
      <tr>
        <td>李四</td>
        <td>20</td>
        <td>女</td>

      </tr>
    </tbody>
  </table>
  
</body>
</html>